import request from '../utils/request'

export const listV2 = (data) => {
  return request({
    url: `product/listV2`,
    method: "post",
    param: data
  })
}

export const detail = (data) => {
  return request({
    url: `product/detail`,
    method: "post",
    param: data
  })
}

export const queryTestApi = (data) => {
  return request({
    url: `material/uploadImageSync`,
    method: "post",
    param: data
  })
}
// 查询文件存在情况

export const searchFolder = (data) => {
  return request({
    url: `material/searchFolder`,
    method: "post",
    param: data
  })
}

// 创建文件夹

export const createFolder = (data) => {
  return request({
    url: `material/createFolder`,
    method: "post",
    param: data
  })
}
// 批量上传素材
export const batchUploadImageSync = (data) => {
  return request({
    url: `material/batchUploadImageSync`,
    method: "post",
    param: data
  })
}
// 发布商品
export const publishProduct = (data) => {
  return request({
    url: `product/addV2`,
    method: "post",
    // param: data
    data
  })
}
// 编辑商品
export const editV2 = (data) => {
  return request({
    url: `product/editV2`,
    method: "post",
    // param: data
    data
  })
}
// 查询商品类目id的属性列表
export const getCatePropertyV2 = (data) => {
  return request({
    url: `product/getCatePropertyV2`,
    method: "post",
    data
  })
}

// 获取规则
export const getProductUpdateRule = (data) => {
  return request({
    url: `product/getProductUpdateRule`,
    method: "post",
    data
  })
}
// 下架
export const setOffline = (data) => {
  return request({
    url: `product/setOffline`,
    method: "post",
    data
  })
}

export const del = (data) => {
  return request({
    url: `product/del`,
    method: "post",
    data
  })
}

export const brandListApi = (data) => { 
  return request({
    url: `brand/list`,
    method: "post",
    data
  })
 }